package com.yangdage.controller;

import com.alibaba.fastjson.JSONObject;
import com.yangdage.annonations.ServiceTokenRequired;
import com.yangdage.config.ScheduleConfig;
import com.yangdage.model.TUserExample;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/quartzTestController")
public class QuartzTestController {
    private Logger log = LoggerFactory.getLogger(QuartzTestController.class);

    @Autowired
    private ScheduleConfig scheduleConfig;

    @GetMapping("/changeQuartz")
    @ResponseBody
    public String changeQuartz(@RequestParam("cron") String cron) {
        scheduleConfig.setCron(cron);
        return "success";
    }
}
